import { FormItemRule } from 'element-plus'
import { Arrayable } from 'element-plus/es/utils'
import { BaseModelPropsNameType, BaseModelType } from '@common'

export type BaseModelFormItemShowType = Record<BaseModelPropsNameType, boolean>

export type BaseModelFormRulesType = Partial<
  Record<BaseModelPropsNameType, Arrayable<FormItemRule>>
>

export type BaseModelTreeNodeType = BaseModelType & {
  count: string
  label: string
  value: string
  children?: BaseModelTreeNodeType[]
}

export type BaseModelTreeType = BaseModelTreeNodeType[]
